<?php include('./application/views/header.php'); ?>

<table>
	<th>Name</th><th>Quantity</th><th>Price</th><th>Action</th>
	<?php 
	
	foreach($prods as $prod) { ?>
		<tr <?php if($prod['quantity']  < 10) echo "class='alert'"; ?>>
			<td>
				<?php echo $prod['name']; ?>
			</td>
			<td>
				<?php echo $prod['quantity']; ?>
			</td>
			<td>
				<?php echo $prod['price']; ?>
			</td>
			<td>
				<?php echo form_open('inventoryControl/process'); ?>
					<?php echo form_hidden('id', $prod['id']); ?>
					<?php echo form_hidden('name', $prod['name']); ?>
					
					<?php echo form_submit('mysubmit', 'Order More!'); ?>
				<?php echo form_close(); ?>
			</td>
		</tr>
	<?php
	} ?>
</table>
<?php include('./application/views/footer.php'); ?>
	